/**
 * Created by zyg on 16/2/16.
 */
const spawn = require('child_process').spawn;
const ls = spawn('phantomjs', ['www.js', 'screenshot','-url','https://meidian-1.play.m.jaeapp.com/?iid=137484&cpp=0']);

ls.stdout.on('data', (data) => {
  console.log(`stdout: ${data}`);
});

ls.stderr.on('data', (data) => {
  console.log(`stderr: ${data}`);
});

ls.on('close', (code) => {
  console.log(`child process exited with code ${code}`);
});